<?php get_header(); ?>
	<div id="content"> 
	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
		<div class="post" id="post-<?php the_ID(); ?>">
			<div class="post-title clearfloat">
					<h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
					<small><?php the_time('Y/m/d') ?></small>
					<small class="cr"><a href="#respond"><?php comments_number( __( 'Add Comments &raquo;', 'paranimage' ), __( '1 Comments &raquo;', 'paranimage' ), __( '% Comments &raquo;', 'paranimage' )); ?></a></small>
				</div>
			<div class="entry">
				<?php the_content(''); ?>
                <?php wp_link_pages( __('before=<div class="linkpages">Pages: &after=</div>','paranimage')); ?>
            </div><!-- end .entry -->
			<div class="post-explore">
				<div class="tabmenu clearfloat">
					<ul>
						<li class="on" id="tabm1" onclick="tabmenu(1)"><?php _e('Post Info', 'paranimage'); ?></li>
						<li class="out" id="tabm2" onclick="tabmenu(2)"><?php if (function_exists('related_posts')) { ?>Related Posts<?php } else { ?><?php _e('Recent Posts', 'paranimage'); ?><?php } ?></li>
						<li class="out" id="tabm3" onclick="tabmenu(3)"><?php _e('Popular Posts', 'paranimage'); ?></li>
						<li class="out" id="tabm4" onclick="tabmenu(4)"><?php _e('Random Posts', 'paranimage'); ?></li>
					</ul>
				</div>
				<div class="tabc" id="tabc1">
					<ul>
						<li><?php _e('Category: &nbsp;', 'paranimage'); ?><?php the_category(', ') ?></li>
						<li><?php _e('Author:  &nbsp;', 'paranimage'); ?><?php the_author_posts_link(); ?> </li>
						<li><?php the_tags( __('Tags:  &nbsp;', 'paranimage'), ", ", " <br />" ) ?></li>
						<?php previous_post_link(__('<li>Older Post:  &nbsp;%link</li>','paranimage')) ?>
						<?php next_post_link(__('<li>Newer Post:  &nbsp;%link</li>','paranimage')) ?>
						<li><?php _e('More:  &nbsp;', 'paranimage'); ?><?php post_comments_feed_link(__('Comments RSS','paranimage')); ?> | <a href="<?php trackback_url(); ?>" rel="trackback"><?php _e('trackback', 'paranimage'); ?></a><?php edit_post_link( __('Edit','paranimage'), ' | ', ''); ?>
						</li>
					</ul>
				</div>
				<div class="tabc" id="tabc2" style="display:none;">
					<?php if (function_exists('related_posts')) { ?>
					<?php related_posts(); ?>
					<?php } else { ?>
						<ul><?php wp_get_archives('type=postbypost&limit=10'); ?></ul>
					<?php } ?>
				</div>
				<div class="tabc" id="tabc3" style="display:none;">
					<?php if (function_exists('get_most_viewed')) { ?>
						<ul>
							<?php get_most_viewed(); ?>
						</ul>
					<?php } else { ?> 
						<ul>
							<?php most_popular_posts(10); ?>
						</ul>
					<?php } ?>
				</div>
				<div class="tabc" id="tabc4" style="display:none;">
					<ul>
					<?php
						$rand_posts = get_posts('numberposts=10&orderby=rand');
						foreach( $rand_posts as $post ) :
						?>
						<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
					<?php endforeach; ?>
					</ul>
					<?php wp_reset_query(); ?>
				</div>
			</div><!-- end .post-explore -->
		</div><!-- end .post -->		
		<?php comments_template('', true); ?>
	<?php endwhile; else: ?>
		<div class="not-found">
			<h2 class="archive-title"><?php _e('The page you`re looking for doesn`t exist', 'paranimage'); ?></h2>
			<div class="entry">
				<p><?php _e('You can try search using keywords or ', 'paranimage'); ?><a href="<?php bloginfo('url'); ?>"><?php _e('go to home', 'paranimage'); ?></a></p>
			</div>
		</div>
	<?php endif; ?>
	</div><!-- end #content -->	
<?php get_sidebar(); ?>
<?php get_footer(); ?>
